package exception_test;

public class ExceptionTest {
    public static void main(String[] args) {
        int[] data={1,2,3};
        System.out.println("before...");
        try {
            System.out.println(data[100]);
            System.out.println("try中的其他代码块");
        }catch (Exception e){
            System.out.println("异常产生了");
            e.printStackTrace();
        }
        System.out.println("after...");
    }
}
